<?php

/*
 *服务层
 */
namespace app\comm\service;
/**
 * 短信通讯类
 */
class SendMsgService{
	/**
	 * 手机发送短信，保存到session
	 * @return [type] [description]
	 */
	public function sendmsg($mobile){
		$cord = rand(100000,999999);
		session('_cord_user_',$cord);
		return true;
	}

	/**
	 * 验证手机发送的验证码
	 */
	public function chech_cord($cord){
		if(session('_cord_user_')==$cord){
			session('_cord_user_',null);
			return true;
		}
		return false;
	}
}

